package com.nsyue.auth.controller.result;


public enum ApiStatusEnum implements IStatus {

    SUCCESS(0, "成功"),

    FAILED(-1, "失败"),

    VALID_ERROR(10001, "参数格式不正确"),

    UNSUPPORTED_GRANT_TYPE(10002, "不支持的认证模式"),

    UNAUTHORIZED(10003, "无权限访问！"),

    TOKEN_MISS(10004, "令牌丢失！"),

    INVALID_TOKEN(10005, "无效令牌！"),

    EXPIRED_TOKEN(10006, "身份过期！"),

    USER_DISABLED(10007, "用户已被禁用！"),

    USER_CODE_ERROR(10008, "用户名或密码错误!"),

    INVALID_SIGNATURE(10009,"无效签名"),

    NO_ROLE(10010, "没有角色信息"),

    ACCESS_DENIED(10011, "拒绝访问！"),

    NOT_REGISTERED(10012, "未注册"),

    UNKNOWN(20000, "未知错误");

    private final long code;
    private final String msg;

    ApiStatusEnum(final long code, final String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
